package com.xlh.openai.service;

import com.plexpt.chatgpt.entity.chat.Message;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.io.IOException;
import java.util.List;

public interface AIService {

    /**
     * 进行对话
     * @param prompt
     * @param openId
     * @return
     */
    String chat(String prompt, String openId);

    /**
     * 返回流式响应
     * @param question
     * @return
     */
    SseEmitter chatStreamQuestion(Integer userId, String question, String parentMessageId, List<Message> messages, String conversationId);

}
